home *** CD-ROM | disk | FTP | other *** search
/ Aminet 49 / Aminet 49 (2002)(GTI - Schatztruhe)[!][Jun 2002].iso / Aminet / text / misc / htmldoc.lha / share / htmldoc / data / prolog.ps < prev    next >
Encoding:
Text File  |  2002-04-18  |  6.3 KB  |  283 lines

  1. %%BeginResource: procset htmldoc-device 1.8 15
  2.  
  3. %
  4. % The following procedures use setpagedevice, which is not supported by
  5. % Level 1 PostScript interpreters.  For these systems, make setpagedevice
  6. % a no-op.
  7. %
  8.  
  9. languagelevel 1 eq { /setpagedevice {pop} BD } if
  10.  
  11. %
  12. % trayMap
  13. %
  14. % The trayMap variable defines an array of tray positions that are
  15. % used when looking up the "MEDIA POSITION nnn" page comment.  The
  16. % array should be exactly 8 elements long.  Unavailable trays should
  17. % be set to -1.
  18. %
  19.  
  20. /trayMap [-1 -1 -1 -1 -1 -1 -1 -1] def
  21.  
  22. product (Xerox DocuPrint N4025 PS3) eq
  23.   { /trayMap [0 1 2 3 4 -1 -1 -1] def } if
  24.  
  25. product (Xerox DocuPrint N2025 PS) eq
  26.   { /trayMap [0 1 2 3 -1 -1 -1 -1] def } if
  27.  
  28. product (HP LaserJet 5Si/5Si MX PS) eq
  29.   { /trayMap [3 0 1 4 -1 -1 -1 -1] def } if
  30.  
  31. product (HP LaserJet 2100 Series) eq
  32.   { /trayMap [3 0 1 -1 -1 -1 -1 -1] def } if
  33.  
  34. product (Xerox Document Centre 220/230) eq
  35.   { /trayMap [1 2 3 4 -1 5 -1 -1] def } if
  36.  
  37. product (Xerox Document Centre 332/340) eq
  38.   { /trayMap [1 2 3 4 -1 5 -1 -1] def } if
  39.  
  40. %product (Insert ModelName string here) eq
  41. %  { /trayMap [-1 -1 -1 -1 -1 -1 -1 -1] def } if
  42.  
  43. %
  44. % haveMediaColor
  45. %
  46. % The haveMediaColor variable defines whether a printer supports the
  47. % MediaColor attribute in the page device dictionary.
  48. %
  49.  
  50. /haveMediaColor
  51.   product (Xerox Document Centre 220/230) eq
  52.   product (Xerox Document Centre 332/340) eq or
  53. %  product (Insert ModelName string here) eq or
  54. def
  55.  
  56. %
  57. % haveMediaPosition
  58. %
  59. % The haveMediaPosition variable defines whether a printer supports
  60. % the MediaPosition attribute in the page device dictionary.
  61. %
  62.  
  63. /haveMediaPosition
  64.   product (Xerox DocuPrint N2025 PS) eq
  65.   product (Xerox DocuPrint N4025 PS3) eq or
  66.   product (Xerox Document Centre 220/230) eq or
  67.   product (Xerox Document Centre 332/340) eq or
  68.   product (HP LaserJet 5Si/5Si MX PS) eq or
  69.   product (HP LaserJet 2100 Series) eq or
  70. %  product (Insert ModelName string here) eq or
  71. def
  72.  
  73. %
  74. % haveMediaType
  75. %
  76. % The haveMediaType variable defines whether a printer supports
  77. % the MediaType attribute in the page device dictionary.
  78. %
  79.  
  80. /haveMediaType
  81.   product (Xerox DocuPrint N2025 PS) eq
  82.   product (Xerox DocuPrint N4025 PS3) eq or
  83.   product (Xerox Document Centre 220/230) eq or
  84.   product (Xerox Document Centre 332/340) eq or
  85.   product (HP LaserJet 5Si/5Si MX PS) eq or
  86. %  product (Insert ModelName string here) eq or
  87. def
  88.  
  89. %
  90. % haveDeferredMediaSelection
  91. %
  92. % The haveDeferredMediaSelection variable defines whether a printer supports
  93. % the DeferredMediaSelection attribute in the page device dictionary.
  94. %
  95.  
  96. /haveDeferredMediaSelection
  97.   product (Xerox DocuPrint N2025 PS) eq
  98.   product (Xerox DocuPrint N4025 PS3) eq or
  99.   product (HP LaserJet 5Si/5Si MX PS) eq or
  100. %  product (Insert ModelName string here) eq or
  101.   not
  102. def
  103.  
  104. %
  105. % haveManualFeed
  106. %
  107. % The haveManualFeed variable defines whether a printer supports
  108. % the ManualFeed attribute in the page device dictionary.
  109. %
  110.  
  111. /haveManualFeed
  112.   product (Xerox DocuPrint N2025 PS) eq
  113.   product (Xerox DocuPrint N4025 PS3) eq or
  114.   product (HP LaserJet 5Si/5Si MX PS) eq or
  115.   product (HP LaserJet 2100 Series) eq or
  116.   product (Xerox Document Centre 220/230) eq or
  117.   product (Xerox Document Centre 332/340) eq or
  118. %  product (Insert ModelName string here) eq or
  119.   not
  120. def
  121.  
  122. %
  123. % haveTraySwitch
  124. %
  125. % The haveTraySwitch variable defines whether a printer supports
  126. % the TraySwitch attribute in the page device dictionary.
  127. %
  128.  
  129. /haveTraySwitch
  130.   product (Xerox DocuPrint N2025 PS) eq
  131.   product (Xerox DocuPrint N4025 PS3) eq or
  132.   product (Xerox Document Centre 220/230) eq or
  133.   product (Xerox Document Centre 332/340) eq or
  134. %  product (Insert ModelName string here) eq or
  135.   not
  136. def
  137.  
  138. %
  139. % copies SetCopies -
  140. %
  141. % Set the number of copies to print.
  142. %
  143.  
  144. /SetCopies {
  145.   % Set the number of copies of each page. For Level 1 printers, use the
  146.   % #copies variable; otherwise, use the NumCopies attribute in the
  147.   % page device dictionary...
  148.   languagelevel 1 eq
  149.   { /#copies 1 index def }
  150.   { << /NumCopies 2 index >> setpagedevice }
  151.   ifelse
  152.  
  153.   % Discard the argument on the stack...
  154.   pop
  155. } BD
  156.  
  157. %
  158. % duplex tumble SetDuplexMode -
  159. %
  160. % Set the duplexing mode; "duplex" and "tumble" are boolean values.
  161. %
  162.  
  163. /SetDuplexMode {
  164.   % Build a page device dictionary with the Duplex and Tumble
  165.   % attributes...
  166.   <<
  167.     /Duplex 3 index
  168.     /Tumble 5 index
  169.   >>
  170.  
  171.   % Register the new attributes...
  172.   setpagedevice
  173.  
  174.   % Discard the arguments on the stack...
  175.   pop pop
  176. } BD
  177.  
  178. %
  179. % string SetMediaColor -
  180. %
  181. % Set the media color for the output.
  182. %
  183.  
  184. /SetMediaColor {
  185.   haveMediaType {
  186.     haveMediaColor {
  187.       % Build a page device dictionary with the MediaColor attribute set to
  188.       % the argument...
  189.       <<
  190.     /MediaColor 2 index
  191.       >>
  192.     } {
  193.       % Build a page device dictionary with the MediaType attribute set to
  194.       % "Color"...
  195.       <<
  196.     /MediaType (Color)
  197.       >>
  198.     } ifelse
  199.  
  200.     % Register any new attributes...
  201.     setpagedevice
  202.   } if
  203.  
  204.   % Discard the media color on the stack...
  205.   pop
  206. } BD
  207.  
  208. %
  209. % number SetMediaPosition -
  210. %
  211. % Set the media position (tray) for the output.
  212. %
  213.  
  214. /SetMediaPosition {
  215.   haveMediaPosition {
  216.     % Add any tray position offset to the tray number.
  217.     trayMap exch 1 sub get dup 0 ge
  218.     {
  219.       % Build a page device dictionary with the MediaPosition,
  220.       % DeferredMediaSelection, ManualFeed, and TraySwitch attributes...
  221.       <<
  222.     /MediaPosition 2 index
  223.     haveDeferredMediaSelection { /DeferredMediaSelection true } if
  224.     haveTraySwitch { /TraySwitch false } if
  225.     haveManualFeed { /ManualFeed false } if
  226.       >>
  227.  
  228.       % Register the new attributes...
  229.       setpagedevice
  230.     }
  231.     { pop }
  232.     ifelse
  233.   } if
  234.  
  235.   % Discard the media position on the stack...
  236.   pop
  237. } BD
  238.  
  239. %
  240. % string SetMediaType -
  241. %
  242. % Set the media type for the output.  Use a null string to do auto selection.
  243. %
  244.  
  245. /SetMediaType {
  246.   % Build a page device dictionary with the MediaPosition attribute...
  247.   <<
  248.     /MediaType 2 index
  249.   >>
  250.  
  251.   % Register the new attribute...
  252.   setpagedevice
  253.  
  254.   % Discard the media type on the stack...
  255.   pop
  256. } BD
  257.  
  258. %
  259. % width height SetPageSize -
  260. %
  261. % Set the media size for the output.
  262. %
  263.  
  264. /SetPageSize {
  265.   % Put the arguments in an array...
  266.   2 array astore
  267.  
  268.   % Build a page device dictionary with the PageSize and ImageableArea
  269.   % attributes...
  270.   <<
  271.     /PageSize 2 index
  272.     /ImageableArea null
  273.   >>
  274.  
  275.   % Register the new attributes...
  276.   setpagedevice
  277.  
  278.   % Discard the size on the stack...
  279.   pop
  280. } BD
  281.  
  282. %%EndResource
  283.